<template>
    <van-nav-bar :title="props.title"
        v-if="route.name == 'index' || route.name == 'shop' || route.name == 'list' || route.name == 'my'" />
    <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" v-else/>
</template>

<script setup>
import { ref } from 'vue';
 const onClickLeft = () => history.back();
const props = defineProps(['title'])
import { useRoute, useRouter } from 'vue-router'
const router = useRouter()
const route = useRoute()
</script>

<style lang="scss" scoped></style>